from random import choice


def get_step():
    step = choice([1, -1]) * choice([0, 1, 2, 3, 4, 5])
    return step


class RandomWalk():
    '''随机数'''

    def __init__(self, num_point=5000):

        self.num_point = num_point
        self.x_value = [0]
        self.y_value = [0]

    def fill_walk(self):

        while len(self.x_value) < self.num_point:

            x_step = get_step()
            y_step = get_step()

            if x_step == 0 and y_step == 0:
                continue

            next_x = self.x_value[-1] + x_step
            next_y = self.y_value[-1] + y_step

            self.x_value.append(next_x)
            self.y_value.append(next_y)
